home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / Script.h < prev    next >
C/C++ Source or Header  |  1996-05-01  |  39KB  |  954 lines

  1. /*
  2.      File:        Script.h
  3.  
  4.      Contains:    Script Manager interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __SCRIPT__
  19. #define __SCRIPT__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. #ifndef __INTLRESOURCES__
  28. #include <IntlResources.h>
  29. #endif
  30. #ifndef __EVENTS__
  31. #include <Events.h>
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT_SUPPORTED
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_ALIGN_SUPPORTED
  43. #pragma options align=mac68k
  44. #endif
  45.  
  46.  
  47. enum {
  48.                                                                 /* Script System constants */
  49.     smSystemScript                = -1,                            /*designates system script.*/
  50.     smCurrentScript                = -2,                            /*designates current font script.*/
  51.     smAllScripts                = -3,                            /*designates any script    */
  52.     smRoman                        = 0,                            /*Roman*/
  53.     smJapanese                    = 1,                            /*Japanese*/
  54.     smTradChinese                = 2,                            /*Traditional Chinese*/
  55.     smKorean                    = 3,                            /*Korean*/
  56.     smArabic                    = 4,                            /*Arabic*/
  57.     smHebrew                    = 5,                            /*Hebrew*/
  58.     smGreek                        = 6,                            /*Greek*/
  59.     smCyrillic                    = 7,                            /*Cyrillic*/
  60.     smRSymbol                    = 8,                            /*Right-left symbol*/
  61.     smDevanagari                = 9,                            /*Devanagari*/
  62.     smGurmukhi                    = 10,                            /*Gurmukhi*/
  63.     smGujarati                    = 11,                            /*Gujarati*/
  64.     smOriya                        = 12,                            /*Oriya*/
  65.     smBengali                    = 13,                            /*Bengali*/
  66.     smTamil                        = 14,                            /*Tamil*/
  67.     smTelugu                    = 15,                            /*Telugu*/
  68.     smKannada                    = 16,                            /*Kannada/Kanarese*/
  69.     smMalayalam                    = 17                            /*Malayalam*/
  70. };
  71.  
  72.  
  73. enum {
  74.     smSinhalese                    = 18,                            /*Sinhalese*/
  75.     smBurmese                    = 19,                            /*Burmese*/
  76.     smKhmer                        = 20,                            /*Khmer/Cambodian*/
  77.     smThai                        = 21,                            /*Thai*/
  78.     smLaotian                    = 22,                            /*Laotian*/
  79.     smGeorgian                    = 23,                            /*Georgian*/
  80.     smArmenian                    = 24,                            /*Armenian*/
  81.     smSimpChinese                = 25,                            /*Simplified Chinese*/
  82.     smTibetan                    = 26,                            /*Tibetan*/
  83.     smMongolian                    = 27,                            /*Mongolian*/
  84.     smGeez                        = 28,                            /*Geez/Ethiopic*/
  85.     smEthiopic                    = 28,                            /*Synonym for smGeez*/
  86.     smEastEurRoman                = 29,                            /*Synonym for smSlavic*/
  87.     smCentralEuroRoman            = smEastEurRoman,                /* another synonym */
  88.     smVietnamese                = 30,                            /*Vietnamese*/
  89.     smExtArabic                    = 31,                            /*extended Arabic*/
  90.     smUninterp                    = 32,                            /*uninterpreted symbols, e.g. palette symbols*/
  91.     smKlingon                    = 32,                            /*Klingon*/
  92.                                                                 /*Obsolete names for script systems (kept for backward compatibility)*/
  93.     smChinese                    = 2,                            /*(use smTradChinese or smSimpChinese)*/
  94.     smRussian                    = 7,                            /*(old name for smCyrillic)*/
  95.                                                                 /* smMaldivian = 25;         (no more smMaldivian!)*/
  96.     smAmharic                    = 28,                            /*(old name for smGeez)*/
  97.     smSlavic                    = 29                            /*(old name for smEastEurRoman)*/
  98. };
  99.  
  100.  
  101. enum {
  102.     smSindhi                    = 31,                            /*(old name for smExtArabic)*/
  103.                                                                 /* Language Codes */
  104.     langEnglish                    = 0,                            /* smRoman script */
  105.     langFrench                    = 1,                            /* smRoman script */
  106.     langGerman                    = 2,                            /* smRoman script */
  107.     langItalian                    = 3,                            /* smRoman script */
  108.     langDutch                    = 4,                            /* smRoman script */
  109.     langSwedish                    = 5,                            /* smRoman script */
  110.     langSpanish                    = 6,                            /* smRoman script */
  111.     langDanish                    = 7,                            /* smRoman script */
  112.     langPortuguese                = 8,                            /* smRoman script */
  113.     langNorwegian                = 9,                            /* smRoman script */
  114.     langHebrew                    = 10,                            /* smHebrew script */
  115.     langJapanese                = 11,                            /* smJapanese script */
  116.     langArabic                    = 12,                            /* smArabic script */
  117.     langFinnish                    = 13,                            /* smRoman script */
  118.     langGreek                    = 14,                            /* should be smGreek script; current systems actually use smRoman (11/95) */
  119.     langIcelandic                = 15,                            /* variant smRoman script */
  120.     langMaltese                    = 16,                            /* variant smRoman script */
  121.     langTurkish                    = 17,                            /* variant smRoman script */
  122.     langCroatian                = 18,                            /* Serbo-Croatian in variant Roman script */
  123.     langTradChinese                = 19                            /* Chinese in traditional characters */
  124. };
  125.  
  126.  
  127. enum {
  128.     langUrdu                    = 20,                            /* smArabic script */
  129.     langHindi                    = 21,                            /* smDevanagari script */
  130.     langThai                    = 22,                            /* smThai script */
  131.     langKorean                    = 23,                            /* smKorean script */
  132.     langLithuanian                = 24,                            /* smCentralEuroRoman script */
  133.     langPolish                    = 25,                            /* smCentralEuroRoman script */
  134.     langHungarian                = 26,                            /* smCentralEuroRoman script */
  135.     langEstonian                = 27,                            /* smCentralEuroRoman script */
  136.     langLettish                    = 28,                            /* smCentralEuroRoman script */
  137.     langLatvian                    = 28,                            /* Synonym for langLettish */
  138.     langSaamisk                    = 29,                            /* lang. of the Sami/Lapp people of Scand. (11/95, no current script supports this) */
  139.     langFaeroese                = 30,                            /* smRoman script */
  140.     langFarsi                    = 31,                            /* smArabic script */
  141.     langPersian                    = 31,                            /* Synonym for langFarsi */
  142.     langRussian                    = 32,                            /* smCyrillic script */
  143.     langSimpChinese                = 33,                            /* Chinese in simplified characters */
  144.     langFlemish                    = 34,                            /* smRoman script */
  145.     langIrish                    = 35,                            /* smRoman script */
  146.     langAlbanian                = 36                            /* smRoman script */
  147. };
  148.  
  149.  
  150. enum {
  151.     langRomanian                = 37,                            /* variant smRoman script (11/95) <22> */
  152.     langCzech                    = 38,                            /* smCentralEuroRoman script */
  153.     langSlovak                    = 39,                            /* smCentralEuroRoman script */
  154.     langSlovenian                = 40,                            /* uses Croatian variant of smRoman script (11/95) <22> */
  155.     langYiddish                    = 41,                            /* smHebrew script */
  156.     langSerbian                    = 42,                            /* Serbo-Croatian in smCyrillic script */
  157.     langMacedonian                = 43,                            /* smCyrillic script */
  158.     langBulgarian                = 44,                            /* variant smCyrillic script (11/95) <22> */
  159.     langUkrainian                = 45,                            /* variant smCyrillic script (11/95) <22> */
  160.     langByelorussian            = 46,                            /* smCyrillic script */
  161.     langUzbek                    = 47,                            /* variant smCyrillic script (11/95) <22> */
  162.     langKazakh                    = 48,                            /* variant smCyrillic script (11/95) <22> */
  163.     langAzerbaijani                = 49,                            /* Azerbaijani in variant smCyrillic script (11/95) <22> */
  164.     langAzerbaijanAr            = 50,                            /* Azerbaijani in smArabic script (Iran) */
  165.     langArmenian                = 51,                            /* smArmenian script */
  166.     langGeorgian                = 52,                            /* smGeorgian script */
  167.     langMoldavian                = 53,                            /* smCyrillic script */
  168.     langKirghiz                    = 54,                            /* variant smCyrillic script (11/95) <22> */
  169.     langTajiki                    = 55,                            /* variant smCyrillic script (11/95) <22> */
  170.     langTurkmen                    = 56                            /* variant smCyrillic script (11/95) <22> */
  171. };
  172.  
  173.  
  174. enum {
  175.     langMongolian                = 57,                            /* Mongolian in smMongolian script */
  176.     langMongolianCyr            = 58,                            /* Mongolian in variant smCyrillic script (11/95) <22> */
  177.     langPashto                    = 59,                            /* smExtArabic script (11/95) <22> */
  178.     langKurdish                    = 60,                            /* smArabic script */
  179.     langKashmiri                = 61,                            /* smExtArabic script (11/95) <22> */
  180.     langSindhi                    = 62,                            /* smExtArabic script (11/95) <22> */
  181.     langTibetan                    = 63,                            /* smTibetan script */
  182.     langNepali                    = 64,                            /* smDevanagari script */
  183.     langSanskrit                = 65,                            /* smDevanagari script */
  184.     langMarathi                    = 66,                            /* smDevanagari script */
  185.     langBengali                    = 67,                            /* smBengali script */
  186.     langAssamese                = 68,                            /* smBengali script */
  187.     langGujarati                = 69,                            /* smGujarati script */
  188.     langPunjabi                    = 70,                            /* smGurmukhi script */
  189.     langOriya                    = 71,                            /* smOriya script */
  190.     langMalayalam                = 72,                            /* smMalayalam script */
  191.     langKannada                    = 73,                            /* smKannada script */
  192.     langTamil                    = 74,                            /* smTamil script */
  193.     langTelugu                    = 75,                            /* smTelugu script */
  194.     langSinhalese                = 76                            /* smSinhalese script */
  195. };
  196.  
  197.  
  198. enum {
  199.     langBurmese                    = 77,                            /* smBurmese script */
  200.     langKhmer                    = 78,                            /* smKhmer script */
  201.     langLao                        = 79,                            /* smLaotian script */
  202.     langVietnamese                = 80,                            /* smVietnamese script */
  203.     langIndonesian                = 81,                            /* smRoman script */
  204.     langTagalog                    = 82,                            /* smRoman script */
  205.     langMalayRoman                = 83,                            /* Malay in smRoman script */
  206.     langMalayArabic                = 84,                            /* Malay in smArabic script */
  207.     langAmharic                    = 85,                            /* smEthiopic script */
  208.     langTigrinya                = 86,                            /* smEthiopic script */
  209.     langGalla                    = 87,                            /* smEthiopic script */
  210.     langOromo                    = 87,                            /* Synonym for langGalla */
  211.     langSomali                    = 88,                            /* smRoman script */
  212.     langSwahili                    = 89,                            /* smRoman script */
  213.     langRuanda                    = 90,                            /* smRoman script */
  214.     langRundi                    = 91,                            /* smRoman script */
  215.     langChewa                    = 92,                            /* smRoman script */
  216.     langMalagasy                = 93,                            /* smRoman script */
  217.     langEsperanto                = 94,                            /* extended Roman script */
  218.     langWelsh                    = 128                            /* smRoman script */
  219. };
  220.  
  221.  
  222. enum {
  223.     langBasque                    = 129,                            /* smRoman script */
  224.     langCatalan                    = 130,                            /* smRoman script */
  225.     langLatin                    = 131,                            /* smRoman script */
  226.     langQuechua                    = 132,                            /* smRoman script */
  227.     langGuarani                    = 133,                            /* smRoman script */
  228.     langAymara                    = 134,                            /* smRoman script */
  229.     langTatar                    = 135,                            /* smCyrillic script */
  230.     langUighur                    = 136,                            /* smArabic script */
  231.     langDzongkha                = 137,                            /* (lang of Bhutan) smTibetan script */
  232.     langJavaneseRom                = 138,                            /* Javanese in smRoman script */
  233.     langSundaneseRom            = 139,                            /* Sundanese in smRoman script */
  234.     langGalician                = 140,                            /* smRoman script */
  235.                                                                 /* Obsolete names, kept for backward compatibility */
  236.     langPortugese                = 8,                            /* old misspelled version, kept for compatibility */
  237.     langMalta                    = 16,                            /* old misspelled version, kept for compatibility */
  238.     langYugoslavian                = 18,                            /* (use langCroatian, langSerbian, etc.) */
  239.     langChinese                    = 19,                            /* (use langTradChinese or langSimpChinese) */
  240.     langLapponian                = 29,                            /* Synonym for langSaamisk, not correct name */
  241.     langLappish                    = 29                            /* Synonym for langSaamisk */
  242. };
  243.  
  244.  
  245. enum {
  246.                                                                 /* Regional version codes */
  247.     verUS                        = 0,
  248.     verFrance                    = 1,
  249.     verBritain                    = 2,
  250.     verGermany                    = 3,
  251.     verItaly                    = 4,
  252.     verNetherlands                = 5,
  253.     verFrBelgiumLux                = 6,                            /* French for Belgium & Luxembourg */
  254.     verSweden                    = 7,
  255.     verSpain                    = 8,
  256.     verDenmark                    = 9,
  257.     verPortugal                    = 10,
  258.     verFrCanada                    = 11,
  259.     verNorway                    = 12
  260. };
  261.  
  262.  
  263. enum {
  264.     verIsrael                    = 13,
  265.     verJapan                    = 14,
  266.     verAustralia                = 15,
  267.     verArabic                    = 16,                            /* synonym for verArabia */
  268.     verFinland                    = 17,
  269.     verFrSwiss                    = 18,                            /* French Swiss */
  270.     verGrSwiss                    = 19,                            /* German Swiss */
  271.     verGreece                    = 20,
  272.     verIceland                    = 21,
  273.     verMalta                    = 22,
  274.     verCyprus                    = 23,
  275.     verTurkey                    = 24,
  276.     verYugoCroatian                = 25,                            /* Croatian system for Yugoslavia */
  277.     verNetherlandsComma            = 26,
  278.     verBelgiumLuxPoint            = 27,
  279.     verCanadaComma                = 28,
  280.     verCanadaPoint                = 29,
  281.     vervariantPortugal            = 30,
  282.     vervariantNorway            = 31,
  283.     vervariantDenmark            = 32,
  284.     verIndiaHindi                = 33,                            /* Hindi system for India */
  285.     verPakistan                    = 34,
  286.     verTurkishModified            = 35,
  287.     verItalianSwiss                = 36,
  288.     verRomania                    = 39,
  289.     verGreekAncient                = 40,
  290.     verLithuania                = 41,
  291.     verPoland                    = 42,
  292.     verHungary                    = 43,
  293.     verEstonia                    = 44,
  294.     verLatvia                    = 45
  295. };
  296.  
  297.  
  298. enum {
  299.     verLapland                    = 46,
  300.     verFaeroeIsl                = 47,
  301.     verIran                        = 48,
  302.     verRussia                    = 49,
  303.     verIreland                    = 50,                            /* English-language version for Ireland */
  304.     verKorea                    = 51,
  305.     verChina                    = 52,
  306.     verTaiwan                    = 53,
  307.     verThailand                    = 54,
  308.     verCzech                    = 56,
  309.     verSlovak                    = 57,
  310.     verGenericFE                = 58,
  311.     verMagyar                    = 59,
  312.     verBengali                    = 60,
  313.     verByeloRussian                = 61,
  314.     verUkrania                    = 62,
  315.     verUkraine                    = 62,
  316.     verAlternateGr                = 64,
  317.     verCroatia                    = 68,
  318.     verBrazil                    = 71,
  319.     verBulgaria                    = 72,
  320.     verCatalonia                = 73
  321. };
  322.  
  323.  
  324. enum {
  325.     minCountry                    = verUS,
  326.     maxCountry                    = verCatalonia                    /* changed from verCroatia when additional enums added */
  327. };
  328.  
  329. /* Obsolete region code names, kept for backward compatibility */
  330.  
  331. enum {
  332.     verBelgiumLux                = 6,                            /* (use verFrBelgiumLux instead, less ambiguous) */
  333.     verArabia                    = 16,
  334.     verYugoslavia                = 25,                            /* (use verYugoCroatian instead, less ambiguous) */
  335.     verIndia                    = 33,                            /* (use verIndiaHindi instead, less ambiguous) */
  336.                                                                 /* Calendar Codes */
  337.     calGregorian                = 0,
  338.     calArabicCivil                = 1,
  339.     calArabicLunar                = 2,
  340.     calJapanese                    = 3,
  341.     calJewish                    = 4,
  342.     calCoptic                    = 5,
  343.     calPersian                    = 6,                            /* Integer Format Codes */
  344.     intWestern                    = 0,
  345.     intArabic                    = 1,
  346.     intRoman                    = 2,
  347.     intJapanese                    = 3,
  348.     intEuropean                    = 4,
  349.     intOutputMask                = 0x8000,                        /* CharByte byte types */
  350.     smSingleByte                = 0,
  351.     smFirstByte                    = -1,
  352.     smLastByte                    = 1,
  353.     smMiddleByte                = 2,                            /* CharType field masks */
  354.     smcTypeMask                    = 0x000F,
  355.     smcReserved                    = 0x00F0
  356. };
  357.  
  358.  
  359. enum {
  360.     smcClassMask                = 0x0F00,
  361.     smcOrientationMask            = 0x1000,                        /*two-byte script glyph orientation*/
  362.     smcRightMask                = 0x2000,
  363.     smcUpperMask                = 0x4000,
  364.     smcDoubleMask                = 0x8000,                        /* Basic CharType character types */
  365.     smCharPunct                    = 0x0000,
  366.     smCharAscii                    = 0x0001,
  367.     smCharEuro                    = 0x0007,
  368.     smCharExtAscii                = 0x0007,                        /* More correct synonym for smCharEuro */
  369.                                                                 /* Additional CharType character types for script systems */
  370.     smCharKatakana                = 0x0002,                        /*Japanese Katakana*/
  371.     smCharHiragana                = 0x0003,                        /*Japanese Hiragana*/
  372.     smCharIdeographic            = 0x0004,                        /*Hanzi, Kanji, Hanja*/
  373.     smCharTwoByteGreek            = 0x0005,                        /*2-byte Greek in Far East systems*/
  374.     smCharTwoByteRussian        = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  375.     smCharBidirect                = 0x0008,                        /*Arabic/Hebrew*/
  376.     smCharContextualLR            = 0x0009,                        /*Contextual left-right: Thai, Indic scripts*/
  377.     smCharNonContextualLR        = 0x000A,                        /*Non-contextual left-right: Cyrillic, Greek*/
  378.     smCharHangul                = 0x000C,                        /*Korean Hangul*/
  379.     smCharJamo                    = 0x000D,                        /*Korean Jamo*/
  380.     smCharBopomofo                = 0x000E,                        /*Chinese Bopomofo*/
  381.     smCharGanaKana                = 0x000F,                        /*Shared for Japanese Hiragana & Katakana*/
  382.                                                                 /* old names for some of above, for backward compatibility */
  383.     smCharFISKana                = 0x0002,                        /*Katakana*/
  384.     smCharFISGana                = 0x0003,                        /*Hiragana*/
  385.     smCharFISIdeo                = 0x0004                        /*Hanzi, Kanji, Hanja*/
  386. };
  387.  
  388.  
  389. enum {
  390.     smCharFISGreek                = 0x0005,                        /*2-byte Greek in Far East systems*/
  391.     smCharFISRussian            = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  392.                                                                 /* CharType classes for punctuation (smCharPunct) */
  393.     smPunctNormal                = 0x0000,
  394.     smPunctNumber                = 0x0100,
  395.     smPunctSymbol                = 0x0200,
  396.     smPunctBlank                = 0x0300,                        /* Additional CharType classes for punctuation in two-byte systems */
  397.     smPunctRepeat                = 0x0400,                        /* repeat marker */
  398.     smPunctGraphic                = 0x0500,                        /* line graphics */
  399.                                                                 /* CharType Katakana and Hiragana classes for two-byte systems */
  400.     smKanaSmall                    = 0x0100,                        /*small kana character*/
  401.     smKanaHardOK                = 0x0200,                        /*can have dakuten*/
  402.     smKanaSoftOK                = 0x0300,                        /*can have dakuten or han-dakuten*/
  403.                                                                 /* CharType Ideographic classes for two-byte systems */
  404.     smIdeographicLevel1            = 0x0000,                        /*level 1 char*/
  405.     smIdeographicLevel2            = 0x0100,                        /*level 2 char*/
  406.     smIdeographicUser            = 0x0200,                        /*user char*/
  407.                                                                 /* old names for above, for backward compatibility */
  408.     smFISClassLvl1                = 0x0000,                        /*level 1 char*/
  409.     smFISClassLvl2                = 0x0100,                        /*level 2 char*/
  410.     smFISClassUser                = 0x0200,                        /*user char*/
  411.                                                                 /* CharType Jamo classes for Korean systems */
  412.     smJamoJaeum                    = 0x0000,                        /*simple consonant char*/
  413.     smJamoBogJaeum                = 0x0100,                        /*complex consonant char*/
  414.     smJamoMoeum                    = 0x0200                        /*simple vowel char*/
  415. };
  416.  
  417.  
  418. enum {
  419.     smJamoBogMoeum                = 0x0300,                        /*complex vowel char*/
  420.                                                                 /* CharType glyph orientation for two-byte systems */
  421.     smCharHorizontal            = 0x0000,                        /* horizontal character form, or for both */
  422.     smCharVertical                = 0x1000,                        /* vertical character form */
  423.                                                                 /* CharType directions */
  424.     smCharLeft                    = 0x0000,
  425.     smCharRight                    = 0x2000,                        /* CharType case modifers */
  426.     smCharLower                    = 0x0000,
  427.     smCharUpper                    = 0x4000,                        /* CharType character size modifiers (1 or multiple bytes). */
  428.     smChar1byte                    = 0x0000,
  429.     smChar2byte                    = 0x8000,                        /* TransliterateText target types for Roman */
  430.     smTransAscii                = 0,                            /*convert to ASCII*/
  431.     smTransNative                = 1,                            /*convert to font script*/
  432.     smTransCase                    = 0xFE,                            /*convert case for all text*/
  433.     smTransSystem                = 0xFF,                            /*convert to system script*/
  434.                                                                 /* TransliterateText target types for two-byte scripts */
  435.     smTransAscii1                = 2,                            /*1-byte Roman*/
  436.     smTransAscii2                = 3,                            /*2-byte Roman*/
  437.     smTransKana1                = 4,                            /*1-byte Japanese Katakana*/
  438.     smTransKana2                = 5                                /*2-byte Japanese Katakana*/
  439. };
  440.  
  441.  
  442. enum {
  443.     smTransGana2                = 7,                            /*2-byte Japanese Hiragana (no 1-byte Hiragana)*/
  444.     smTransHangul2                = 8,                            /*2-byte Korean Hangul*/
  445.     smTransJamo2                = 9,                            /*2-byte Korean Jamo*/
  446.     smTransBopomofo2            = 10,                            /*2-byte Chinese Bopomofo*/
  447.                                                                 /* TransliterateText target modifiers */
  448.     smTransLower                = 0x4000,                        /*target becomes lowercase*/
  449.     smTransUpper                = 0x8000,                        /*target becomes uppercase*/
  450.                                                                 /* TransliterateText resource format numbers */
  451.     smTransRuleBaseFormat        = 1,                            /*Rule based trsl resource format */
  452.     smTransHangulFormat            = 2,                            /*Table based Hangul trsl resource format*/
  453.                                                                 /* TransliterateText property flags */
  454.     smTransPreDoubleByting        = 1,                            /*Convert all text to double byte before transliteration*/
  455.     smTransPreLowerCasing        = 2,                            /*Convert all text to lower case before transliteration*/
  456.                                                                 /* TransliterateText source mask - general */
  457.     smMaskAll                    = 0xFFFFFFFF,                    /*Convert all text*/
  458.                                                                 /* TransliterateText source masks */
  459.     smMaskAscii                    = 0x00000001,                    /*2^smTransAscii*/
  460.     smMaskNative                = 0x00000002,                    /*2^smTransNative*/
  461.                                                                 /* TransliterateText source masks for two-byte scripts */
  462.     smMaskAscii1                = 0x00000004,                    /*2^smTransAscii1*/
  463.     smMaskAscii2                = 0x00000008,                    /*2^smTransAscii2*/
  464.     smMaskKana1                    = 0x00000010,                    /*2^smTransKana1*/
  465.     smMaskKana2                    = 0x00000020,                    /*2^smTransKana2*/
  466.     smMaskGana2                    = 0x00000080,                    /*2^smTransGana2*/
  467.     smMaskHangul2                = 0x00000100,                    /*2^smTransHangul2*/
  468.     smMaskJamo2                    = 0x00000200,                    /*2^smTransJamo2*/
  469.     smMaskBopomofo2                = 0x00000400                    /*2^smTransBopomofo2*/
  470. };
  471.  
  472.  
  473. enum {
  474.                                                                 /* Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. */
  475.     smNotInstalled                = 0,                            /*routine not available in script*/
  476.     smBadVerb                    = -1,                            /*Bad verb passed to a routine*/
  477.     smBadScript                    = -2                            /*Bad script code passed to a routine*/
  478. };
  479.  
  480.  
  481. enum {
  482.                                                                 /* Values for script redraw flag. */
  483.     smRedrawChar                = 0,                            /*Redraw character only*/
  484.     smRedrawWord                = 1,                            /*Redraw entire word (2-byte systems)*/
  485.     smRedrawLine                = -1,                            /*Redraw entire line (bidirectional systems)*/
  486.                                                                 /* GetScriptManagerVariable and SetScriptManagerVariable verbs */
  487.     smVersion                    = 0,                            /*Script Manager version number*/
  488.     smMunged                    = 2,                            /*Globals change count*/
  489.     smEnabled                    = 4,                            /*Count of enabled scripts, incl Roman*/
  490.     smBidirect                    = 6,                            /*At least one bidirectional script*/
  491.     smFontForce                    = 8,                            /*Force font flag*/
  492.     smIntlForce                    = 10,                            /*Force intl flag*/
  493.     smForced                    = 12,                            /*Script was forced to system script*/
  494.     smDefault                    = 14,                            /*Script was defaulted to Roman script*/
  495.     smPrint                        = 16,                            /*Printer action routine*/
  496.     smSysScript                    = 18,                            /*System script*/
  497.     smLastScript                = 20,                            /*Last keyboard script*/
  498.     smKeyScript                    = 22,                            /*Keyboard script*/
  499.     smSysRef                    = 24,                            /*System folder refNum*/
  500.     smKeyCache                    = 26,                            /*obsolete*/
  501.     smKeySwap                    = 28,                            /*Swapping table handle*/
  502.     smGenFlags                    = 30,                            /*General flags long*/
  503.     smOverride                    = 32                            /*Script override flags*/
  504. };
  505.  
  506.  
  507. enum {
  508.     smCharPortion                = 34,                            /*Ch vs SpExtra proportion*/
  509.                                                                 /* New for System 7.0: */
  510.     smDoubleByte                = 36,                            /*Flag for double-byte script installed*/
  511.     smKCHRCache                    = 38,                            /*Returns pointer to KCHR cache*/
  512.     smRegionCode                = 40,                            /*Returns current region code (verXxx)*/
  513.     smKeyDisableState            = 42,                            /*Returns current keyboard disable state*/
  514.                                                                 /* GetScriptVariable and SetScriptVariable verbs. */
  515.                                                                 /* Note: Verbs private to script systems are negative, while */
  516.                                                                 /* those general across script systems are non-negative. */
  517.     smScriptVersion                = 0,                            /*Script software version*/
  518.     smScriptMunged                = 2,                            /*Script entry changed count*/
  519.     smScriptEnabled                = 4,                            /*Script enabled flag*/
  520.     smScriptRight                = 6,                            /*Right to left flag*/
  521.     smScriptJust                = 8,                            /*Justification flag*/
  522.     smScriptRedraw                = 10,                            /*Word redraw flag*/
  523.     smScriptSysFond                = 12,                            /*Preferred system font*/
  524.     smScriptAppFond                = 14,                            /*Preferred Application font*/
  525.     smScriptBundle                = 16,                            /*Beginning of itlb verbs*/
  526.     smScriptNumber                = 16,                            /*Script itl0 id*/
  527.     smScriptDate                = 18,                            /*Script itl1 id*/
  528.     smScriptSort                = 20,                            /*Script itl2 id*/
  529.     smScriptFlags                = 22,                            /*flags word*/
  530.     smScriptToken                = 24,                            /*Script itl4 id*/
  531.     smScriptEncoding            = 26,                            /*id of optional itl5, if present*/
  532.     smScriptLang                = 28                            /*Current language for script*/
  533. };
  534.  
  535.  
  536. enum {
  537.     smScriptNumDate                = 30,                            /*Script Number/Date formats.*/
  538.     smScriptKeys                = 32,                            /*Script KCHR id*/
  539.     smScriptIcon                = 34,                            /*ID # of SICN or kcs#/kcs4/kcs8 suite*/
  540.     smScriptPrint                = 36,                            /*Script printer action routine*/
  541.     smScriptTrap                = 38,                            /*Trap entry pointer*/
  542.     smScriptCreator                = 40,                            /*Script file creator*/
  543.     smScriptFile                = 42,                            /*Script file name*/
  544.     smScriptName                = 44,                            /*Script name*/
  545.                                                                 /* There is a hole here for old Kanji private verbs 46-76 */
  546.                                                                 /* New for System 7.0: */
  547.     smScriptMonoFondSize        = 78,                            /*default monospace FOND (hi) & size (lo)*/
  548.     smScriptPrefFondSize        = 80,                            /*preferred FOND (hi) & size (lo)*/
  549.     smScriptSmallFondSize        = 82,                            /*default small FOND (hi) & size (lo)*/
  550.     smScriptSysFondSize            = 84,                            /*default system FOND (hi) & size (lo)*/
  551.     smScriptAppFondSize            = 86,                            /*default app FOND (hi) & size (lo)*/
  552.     smScriptHelpFondSize        = 88,                            /*default Help Mgr FOND (hi) & size (lo)*/
  553.     smScriptValidStyles            = 90,                            /*mask of valid styles for script*/
  554.     smScriptAliasStyle            = 92,                            /*style (set) to use for aliases*/
  555.                                                                 /* Special script code values for International Utilities */
  556.     iuSystemScript                = -1,                            /* <obsolete>  system script */
  557.     iuCurrentScript                = -2,                            /* <obsolete>  current script (for font of grafPort) */
  558.                                                                 /* Negative verbs for KeyScript */
  559.     smKeyNextScript                = -1,                            /* Switch to next available script */
  560.     smKeySysScript                = -2,                            /* Switch to the system script */
  561.     smKeySwapScript                = -3,                            /* Switch to previously-used script */
  562.                                                                 /* New for System 7.0: */
  563.     smKeyNextKybd                = -4                            /* Switch to next keyboard in current keyscript */
  564. };
  565.  
  566.  
  567. enum {
  568.     smKeySwapKybd                = -5,                            /* Switch to previously-used keyboard in current keyscript */
  569.     smKeyDisableKybds            = -6,                            /* Disable keyboards not in system or Roman script */
  570.     smKeyEnableKybds            = -7,                            /* Re-enable keyboards for all enabled scripts */
  571.     smKeyToggleInline            = -8,                            /* Toggle inline input for current keyscript */
  572.     smKeyToggleDirection        = -9,                            /* Toggle default line direction (TESysJust) */
  573.     smKeyNextInputMethod        = -10,                            /* Switch to next input method in current keyscript */
  574.     smKeySwapInputMethod        = -11,                            /* Switch to last-used input method in current keyscript */
  575.     smKeyDisableKybdSwitch        = -12,                            /* Disable switching from the current keyboard */
  576.     smKeySetDirLeftRight        = -15,                            /* Set default line dir to left-right, align left */
  577.     smKeySetDirRightLeft        = -16,                            /* Set default line dir to right-left, align right */
  578.     smKeyRoman                    = -17,                            /* Set keyscript to Roman. Does nothing if Roman-only */
  579.                                                                 /* system, unlike KeyScript(smRoman) which forces */
  580.                                                                 /* an update to current default Roman keyboard */
  581.                                                                 /* Bits in the smScriptFlags word */
  582.                                                                 /*  (bits above 8 are non-static) */
  583.     smsfIntellCP                = 0,                            /*Script has intelligent cut & paste*/
  584.     smsfSingByte                = 1,                            /*Script has only single bytes*/
  585.     smsfNatCase                    = 2,                            /*Native chars have upper & lower case*/
  586.     smsfContext                    = 3,                            /*Script is contextual*/
  587.     smsfNoForceFont                = 4,                            /*Script will not force characters*/
  588.     smsfB0Digits                = 5,                            /*Script has alternate digits at B0-B9*/
  589.     smsfAutoInit                = 6,                            /*Auto initialize the script*/
  590.     smsfUnivExt                    = 7,                            /*Script is handled by universal extension*/
  591.     smsfSynchUnstyledTE            = 8,                            /*Script synchronizes for unstyled TE*/
  592.     smsfForms                    = 13,                            /*Uses contextual forms for letters*/
  593.     smsfLigatures                = 14,                            /*Uses contextual ligatures*/
  594.     smsfReverse                    = 15,                            /*Reverses native text, right-left*/
  595.                                                                 /* Bits in the smGenFlags long. */
  596.                                                                 /* First (high-order) byte is set from itlc flags byte. */
  597.     smfShowIcon                    = 31,                            /*Show icon even if only one script*/
  598.     smfDualCaret                = 30,                            /*Use dual caret for mixed direction text*/
  599.     smfNameTagEnab                = 29,                            /*Reserved for internal use*/
  600.     smfUseAssocFontInfo            = 28                            /*Use the associated font info for FontMetrics calls <48>*/
  601. };
  602.  
  603.  
  604. enum {
  605.                                                                 /* Roman script constants */
  606.                                                                 /* The following are here for backward compatibility, but should not be used. */
  607.                                                                 /* This information should be obtained using GetScript. */
  608.     romanSysFond                = 0x3FFF,                        /*system font id number*/
  609.     romanAppFond                = 3,                            /*application font id number*/
  610.     romanFlags                    = 0x0007,                        /*roman settings*/
  611.                                                                 /* Script Manager font equates. */
  612.     smFondStart                    = 0x4000,                        /*start from 16K*/
  613.     smFondEnd                    = 0xC000,                        /*past end of range at 48K*/
  614.                                                                 /* Miscellaneous font equates. */
  615.     smUprHalfCharSet            = 0x80,                            /*first char code in top half of std char set*/
  616.                                                                 /* Character Set Extensions */
  617.     diaeresisUprY                = 0xD9,
  618.     fraction                    = 0xDA,
  619.     intlCurrency                = 0xDB,
  620.     leftSingGuillemet            = 0xDC,
  621.     rightSingGuillemet            = 0xDD,
  622.     fiLigature                    = 0xDE,
  623.     flLigature                    = 0xDF,
  624.     dblDagger                    = 0xE0,
  625.     centeredDot                    = 0xE1,
  626.     baseSingQuote                = 0xE2,
  627.     baseDblQuote                = 0xE3,
  628.     perThousand                    = 0xE4,
  629.     circumflexUprA                = 0xE5
  630. };
  631.  
  632.  
  633. enum {
  634.     circumflexUprE                = 0xE6,
  635.     acuteUprA                    = 0xE7,
  636.     diaeresisUprE                = 0xE8,
  637.     graveUprE                    = 0xE9,
  638.     acuteUprI                    = 0xEA,
  639.     circumflexUprI                = 0xEB,
  640.     diaeresisUprI                = 0xEC,
  641.     graveUprI                    = 0xED,
  642.     acuteUprO                    = 0xEE,
  643.     circumflexUprO                = 0xEF,
  644.     appleLogo                    = 0xF0,
  645.     graveUprO                    = 0xF1,
  646.     acuteUprU                    = 0xF2,
  647.     circumflexUprU                = 0xF3,
  648.     graveUprU                    = 0xF4,
  649.     dotlessLwrI                    = 0xF5,
  650.     circumflex                    = 0xF6,
  651.     tilde                        = 0xF7,
  652.     macron                        = 0xF8,
  653.     breveMark                    = 0xF9
  654. };
  655.  
  656.  
  657. enum {
  658.     overDot                        = 0xFA,
  659.     ringMark                    = 0xFB,
  660.     cedilla                        = 0xFC,
  661.     doubleAcute                    = 0xFD,
  662.     ogonek                        = 0xFE,
  663.     hachek                        = 0xFF,                            /* TokenType values */
  664.     tokenIntl                    = 4,                            /*the itl resource number of the tokenizer*/
  665.     tokenEmpty                    = -1                            /*used internally as an empty flag*/
  666. };
  667.  
  668.  
  669. enum {
  670.     tokenUnknown                = 0,                            /*chars that do not match a defined token type*/
  671.     tokenWhite                    = 1,                            /*white space*/
  672.     tokenLeftLit                = 2,                            /*literal begin*/
  673.     tokenRightLit                = 3,                            /*literal end*/
  674.     tokenAlpha                    = 4,                            /*alphabetic*/
  675.     tokenNumeric                = 5,                            /*numeric*/
  676.     tokenNewLine                = 6,                            /*new line*/
  677.     tokenLeftComment            = 7,                            /*open comment*/
  678.     tokenRightComment            = 8,                            /*close comment*/
  679.     tokenLiteral                = 9,                            /*literal*/
  680.     tokenEscape                    = 10,                            /*character escape (e.g. '\' in "\n", "\t")*/
  681.     tokenAltNum                    = 11,                            /*alternate number (e.g. $B0-B9 in Arabic,Hebrew)*/
  682.     tokenRealNum                = 12,                            /*real number*/
  683.     tokenAltReal                = 13,                            /*alternate real number*/
  684.     tokenReserve1                = 14,                            /*reserved*/
  685.     tokenReserve2                = 15,                            /*reserved*/
  686.     tokenLeftParen                = 16,                            /*open parenthesis*/
  687.     tokenRightParen                = 17,                            /*close parenthesis*/
  688.     tokenLeftBracket            = 18,                            /*open square bracket*/
  689.     tokenRightBracket            = 19                            /*close square bracket*/
  690. };
  691.  
  692.  
  693. enum {
  694.     tokenLeftCurly                = 20,                            /*open curly bracket*/
  695.     tokenRightCurly                = 21,                            /*close curly bracket*/
  696.     tokenLeftEnclose            = 22,                            /*open guillemet*/
  697.     tokenRightEnclose            = 23,                            /*close guillemet*/
  698.     tokenPlus                    = 24,
  699.     tokenMinus                    = 25,
  700.     tokenAsterisk                = 26,                            /*times/multiply*/
  701.     tokenDivide                    = 27,
  702.     tokenPlusMinus                = 28,                            /*plus or minus symbol*/
  703.     tokenSlash                    = 29,
  704.     tokenBackSlash                = 30,
  705.     tokenLess                    = 31,                            /*less than symbol*/
  706.     tokenGreat                    = 32,                            /*greater than symbol*/
  707.     tokenEqual                    = 33,
  708.     tokenLessEqual2                = 34,                            /*less than or equal, 2 characters (e.g. <=)*/
  709.     tokenLessEqual1                = 35,                            /*less than or equal, 1 character*/
  710.     tokenGreatEqual2            = 36,                            /*greater than or equal, 2 characters (e.g. >=)*/
  711.     tokenGreatEqual1            = 37,                            /*greater than or equal, 1 character*/
  712.     token2Equal                    = 38,                            /*double equal (e.g. ==)*/
  713.     tokenColonEqual                = 39                            /*colon equal*/
  714. };
  715.  
  716.  
  717. enum {
  718.     tokenNotEqual                = 40,                            /*not equal, 1 character*/
  719.     tokenLessGreat                = 41,                            /*less/greater, Pascal not equal (e.g. <>)*/
  720.     tokenExclamEqual            = 42,                            /*exclamation equal, C not equal (e.g. !=)*/
  721.     tokenExclam                    = 43,                            /*exclamation point*/
  722.     tokenTilde                    = 44,                            /*centered tilde*/
  723.     tokenComma                    = 45,
  724.     tokenPeriod                    = 46,
  725.     tokenLeft2Quote                = 47,                            /*open double quote*/
  726.     tokenRight2Quote            = 48,                            /*close double quote*/
  727.     tokenLeft1Quote                = 49,                            /*open single quote*/
  728.     tokenRight1Quote            = 50,                            /*close single quote*/
  729.     token2Quote                    = 51,                            /*double quote*/
  730.     token1Quote                    = 52,                            /*single quote*/
  731.     tokenSemicolon                = 53,
  732.     tokenPercent                = 54,
  733.     tokenCaret                    = 55,
  734.     tokenUnderline                = 56,
  735.     tokenAmpersand                = 57,
  736.     tokenAtSign                    = 58,
  737.     tokenBar                    = 59                            /*vertical bar*/
  738. };
  739.  
  740.  
  741. enum {
  742.     tokenQuestion                = 60,
  743.     tokenPi                        = 61,                            /*lower-case pi*/
  744.     tokenRoot                    = 62,                            /*square root symbol*/
  745.     tokenSigma                    = 63,                            /*capital sigma*/
  746.     tokenIntegral                = 64,                            /*integral sign*/
  747.     tokenMicro                    = 65,
  748.     tokenCapPi                    = 66,                            /*capital pi*/
  749.     tokenInfinity                = 67,
  750.     tokenColon                    = 68,
  751.     tokenHash                    = 69,                            /*e.g. #*/
  752.     tokenDollar                    = 70,
  753.     tokenNoBreakSpace            = 71,                            /*non-breaking space*/
  754.     tokenFraction                = 72,
  755.     tokenIntlCurrency            = 73,
  756.     tokenLeftSingGuillemet        = 74,
  757.     tokenRightSingGuillemet        = 75,
  758.     tokenPerThousand            = 76,
  759.     tokenEllipsis                = 77,
  760.     tokenCenterDot                = 78,
  761.     tokenNil                    = 127
  762. };
  763.  
  764.  
  765. enum {
  766.     delimPad                    = -2,                            /* obsolete, misspelled token names kept for backward compatibility */
  767.     tokenTilda                    = 44,
  768.     tokenCarat                    = 55
  769. };
  770.  
  771.  
  772. enum {
  773.                                                                 /* Table selectors for GetItlTable */
  774.     smWordSelectTable            = 0,                            /* get word select break table from 'itl2' */
  775.     smWordWrapTable                = 1,                            /* get word wrap break table from 'itl2' */
  776.     smNumberPartsTable            = 2,                            /* get default number parts table from 'itl4' */
  777.     smUnTokenTable                = 3,                            /* get unToken table from 'itl4' */
  778.     smWhiteSpaceList            = 4,                            /* get white space list from 'itl4' */
  779.     iuWordSelectTable            = 0,                            /* <obsolete>  get word select break table from 'itl2' */
  780.     iuWordWrapTable                = 1,                            /* <obsolete>  get word wrap break table from 'itl2' */
  781.     iuNumberPartsTable            = 2,                            /* <obsolete>  get default number parts table from 'itl4' */
  782.     iuUnTokenTable                = 3,                            /* <obsolete>  get unToken table from 'itl4' */
  783.     iuWhiteSpaceList            = 4                                /* <obsolete>  get white space list from 'itl4' */
  784. };
  785.  
  786. /* end of stuff moved from Packages.h */
  787.  
  788. enum {
  789.     tokenOK                        = 0,                            /* TokenResults */
  790.     tokenOverflow                = 1,                            /* TokenResults */
  791.     stringOverflow                = 2,                            /* TokenResults */
  792.     badDelim                    = 3,                            /* TokenResults */
  793.     badEnding                    = 4,                            /* TokenResults */
  794.     crash                        = 5                                /* TokenResults */
  795. };
  796.  
  797. typedef SInt8 TokenResults;
  798. typedef char CharByteTable[256];
  799. typedef short TokenType;
  800. typedef TokenType DelimType[2];
  801. typedef TokenType CommentType[4];
  802. struct TokenRec {
  803.     TokenType                         theToken;
  804.     Ptr                             position;                    /*pointer into original source*/
  805.     long                             length;                        /*length of text in original source*/
  806.     StringPtr                         stringPosition;                /*Pascal/C string copy of identifier*/
  807. };
  808. typedef struct TokenRec TokenRec;
  809.  
  810. typedef TokenRec *TokenRecPtr;
  811. struct TokenBlock {
  812.     Ptr                             source;                        /*pointer to stream of characters*/
  813.     long                             sourceLength;                /*length of source stream*/
  814.     Ptr                             tokenList;                    /*pointer to array of tokens*/
  815.     long                             tokenLength;                /*maximum length of TokenList*/
  816.     long                             tokenCount;                    /*number tokens generated by tokenizer*/
  817.     Ptr                             stringList;                    /*pointer to stream of identifiers*/
  818.     long                             stringLength;                /*length of string list*/
  819.     long                             stringCount;                /*number of bytes currently used*/
  820.     Boolean                         doString;                    /*make strings & put into StringList*/
  821.     Boolean                         doAppend;                    /*append to TokenList rather than replace*/
  822.     Boolean                         doAlphanumeric;                /*identifiers may include numeric*/
  823.     Boolean                         doNest;                        /*do comments nest?*/
  824.     TokenType                         leftDelims[2];
  825.     TokenType                         rightDelims[2];
  826.     TokenType                         leftComment[4];
  827.     TokenType                         rightComment[4];
  828.     TokenType                         escapeCode;                    /*escape symbol code*/
  829.     TokenType                         decimalCode;
  830.     Handle                             itlResource;                /*handle to itl4 resource of current script*/
  831.     long                             reserved[8];                /*must be zero!*/
  832. };
  833. typedef struct TokenBlock TokenBlock;
  834.  
  835. typedef TokenBlock *TokenBlockPtr;
  836. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  837. extern pascal short GetSysDirection(void)
  838.  TWOWORDINLINE(0x3EB8, 0x0BAC);
  839.  
  840. extern pascal void SetSysDirection(short value)
  841.  TWOWORDINLINE(0x31DF, 0x0BAC);
  842.  
  843. extern pascal short FontScript(void )
  844.  FOURWORDINLINE(0x2F3C, 0x8200, 0x0000, 0xA8B5);
  845.  
  846. extern pascal short IntlScript(void )
  847.  FOURWORDINLINE(0x2F3C, 0x8200, 0x0002, 0xA8B5);
  848.  
  849. extern pascal void KeyScript(short code)
  850.  FOURWORDINLINE(0x2F3C, 0x8002, 0x0004, 0xA8B5);
  851.  
  852. extern pascal Boolean IsCmdChar(const EventRecord *event, short test)
  853.  FOURWORDINLINE(0x2F3C, 0x8206, 0xFFD0, 0xA8B5);
  854.  
  855. extern pascal short FontToScript(short fontNumber)
  856.  FOURWORDINLINE(0x2F3C, 0x8202, 0x0006, 0xA8B5);
  857.  
  858. extern pascal long GetScriptManagerVariable(short selector)
  859.  FOURWORDINLINE(0x2F3C, 0x8402, 0x0008, 0xA8B5);
  860.  
  861. extern pascal OSErr SetScriptManagerVariable(short selector, long param)
  862.  FOURWORDINLINE(0x2F3C, 0x8206, 0x000A, 0xA8B5);
  863.  
  864. extern pascal long GetScriptVariable(short script, short selector)
  865.  FOURWORDINLINE(0x2F3C, 0x8404, 0x000C, 0xA8B5);
  866.  
  867. extern pascal OSErr SetScriptVariable(short script, short selector, long param)
  868.  FOURWORDINLINE(0x2F3C, 0x8208, 0x000E, 0xA8B5);
  869.  
  870. extern pascal short CharacterByteType(Ptr textBuf, short textOffset, ScriptCode script)
  871.  FOURWORDINLINE(0x2F3C, 0xC206, 0x0010, 0xA8B5);
  872.  
  873. extern pascal short CharacterType(Ptr textBuf, short textOffset, ScriptCode script)
  874.  FOURWORDINLINE(0x2F3C, 0xC206, 0x0012, 0xA8B5);
  875.  
  876. extern pascal OSErr TransliterateText(Handle srcHandle, Handle dstHandle, short target, long srcMask, ScriptCode script)
  877.  FOURWORDINLINE(0x2F3C, 0xC20E, 0x0018, 0xA8B5);
  878.  
  879. extern pascal Boolean FillParseTable(CharByteTable table, ScriptCode script)
  880.  FOURWORDINLINE(0x2F3C, 0xC204, 0x0022, 0xA8B5);
  881.  
  882. extern pascal Handle GetIntlResource(short theID)
  883.  THREEWORDINLINE(0x3F3C, 0x0006, 0xA9ED);
  884.  
  885. extern pascal void ClearIntlResourceCache(void )
  886.  THREEWORDINLINE(0x3F3C, 0x0018, 0xA9ED);
  887.  
  888. extern pascal void GetIntlResourceTable(ScriptCode script, short tableCode, Handle *itlHandle, long *offset, long *length)
  889.  THREEWORDINLINE(0x3F3C, 0x0024, 0xA9ED);
  890.  
  891. extern pascal UniversalProcPtr GetScriptUtilityAddress(short selector, Boolean Before, ScriptCode script)
  892.  FOURWORDINLINE(0x2F3C, 0xC404, 0x0038, 0xA8B5);
  893.  
  894. extern pascal void SetScriptUtilityAddress(short selector, Boolean Before, UniversalProcPtr routineAddr, ScriptCode script)
  895.  FOURWORDINLINE(0x2F3C, 0xC008, 0x003A, 0xA8B5);
  896.  
  897. extern pascal UniversalProcPtr GetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, ScriptCode script)
  898.  FOURWORDINLINE(0x2F3C, 0xC406, 0x003C, 0xA8B5);
  899.  
  900. extern pascal void SetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, UniversalProcPtr routineAddr, ScriptCode script)
  901.  FOURWORDINLINE(0x2F3C, 0xC00A, 0x003E, 0xA8B5);
  902.  
  903. extern pascal void SetIntlResource(short refNum, short theID, Handle intlHandle)
  904.  THREEWORDINLINE(0x3F3C, 0x0008, 0xA9ED);
  905.  
  906. #endif
  907. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  908. extern pascal short CharByte(Ptr textBuf, short textOffset)
  909.  FOURWORDINLINE(0x2F3C, 0x8206, 0x0010, 0xA8B5);
  910.  
  911. extern pascal short CharType(Ptr textBuf, short textOffset)
  912.  FOURWORDINLINE(0x2F3C, 0x8206, 0x0012, 0xA8B5);
  913.  
  914. extern pascal OSErr Transliterate(Handle srcHandle, Handle dstHandle, short target, long srcMask)
  915.  FOURWORDINLINE(0x2F3C, 0x820E, 0x0018, 0xA8B5);
  916.  
  917. extern pascal Boolean ParseTable(CharByteTable table)
  918.  FOURWORDINLINE(0x2F3C, 0x8204, 0x0022, 0xA8B5);
  919.  
  920. extern pascal TokenResults IntlTokenize(TokenBlockPtr tokenParam)
  921.  FOURWORDINLINE(0x2F3C, 0x8204, 0xFFFA, 0xA8B5);
  922.  
  923. #endif
  924. #if OLDROUTINENAMES
  925. #define SetSysJust(newJust) SetSysDirection(newJust)
  926. #define GetSysJust() GetSysDirection()
  927. #define Font2Script(fontNumber) FontToScript(fontNumber)
  928. #define GetEnvirons(verb) GetScriptManagerVariable(verb)
  929. #define SetEnvirons(verb, param) SetScriptManagerVariable(verb, param)
  930. #define GetScript(script, verb) GetScriptVariable(script, verb)
  931. #define SetScript(script, verb, param) SetScriptVariable(script, verb, param)
  932. #define IUGetIntl(theID) GetIntlResource(theID) 
  933. #define IUSetIntl(refNum, theID, intlHandle) SetIntlResource(refNum, theID, intlHandle)
  934. #define IUClearCache() ClearIntlResourceCache()
  935. #define IUGetItlTable(script, tableCode, itlHandle, offset, length) \
  936.          GetIntlResourceTable(script, tableCode, itlHandle, offset, length)
  937. #else
  938. #endif
  939.  
  940. #if PRAGMA_ALIGN_SUPPORTED
  941. #pragma options align=reset
  942. #endif
  943.  
  944. #if PRAGMA_IMPORT_SUPPORTED
  945. #pragma import off
  946. #endif
  947.  
  948. #ifdef __cplusplus
  949. }
  950. #endif
  951.  
  952. #endif /* __SCRIPT__ */
  953.  
  954.